
import VueRouter from 'vue-router'

//导入 路由组件
import Home from './components/navTab/Home.vue'
import Assignment from './components/navTab/Assignment.vue'
import Report from './components/navTab/Report.vue'
import Profile from './components/navTab/Profile.vue'

//导入新闻组件
import NewsList from './components/news/NewsList.vue'
// 导入 新闻详情页面 
import NewsDetails from './components/news/NewsDetails.vue'
//导入图片列表组件
import Photo from './components/photo/Photo.vue'
// 导入商品组件
import Product from './components/product/Product.vue'


// 创建路由对象
var router = new VueRouter({
    routes: [
        {path: '/home',component: Home},
        {path: '/assignment',component: Assignment},
        {path: '/report',component: Report},
        {path: '/profile',component: Profile},
        {path:'/',redirect: 'home'},
        {path: '/home/newlist',component: NewsList},
        {path: '/home/newdetails/:id',component: NewsDetails}, //注意参数 id的配置
        {path: '/home/photo',component: Photo},
        {path: '/home/product',component: Product}
    ],
    linkActiveClass:'mui-active'  // 覆盖默认高亮的类
});

export default router;